package com.financing.wap.service;

import java.sql.SQLException;

import javax.servlet.http.HttpServletRequest;

import com.financing.wap.common.ResultMap;
import com.financing.wap.dto.RegisterDTO;
import com.financing.wap.dto.UserDTO;

public interface IWechatCoreService {
	
	/** 
     * 开放-生成登陆二维码URL
     *  
     * @param request 
     * @return  boolean
     */  
    public String getOpenWeixinLogin(HttpServletRequest request) throws Exception;
    
    /** 
     * 开放-扫描二维码回调方法
     *  
     * @param request 
     * @return  boolean
     */  
    public ResultMap openCallback(HttpServletRequest request) throws Exception;
    
    /** 
     * 公众-扫描二维码回调方法
     *  
     * @param request 
     * @return  boolean
     */  
    public ResultMap mpCallback(HttpServletRequest request) throws Exception;
    
    /** 
     * 移动应用-调用code方法
     *  
     * @param request 
     * @return  boolean
     */  
    public ResultMap appCallback(HttpServletRequest request) throws Exception;
    
	/**
	 * 
	 * @Title: insertUserWechat
	 * @Description: 1、验证登录用户合法  2、关联用户  3、登录
	 * @param faUserWechatDTO
	 * @throws SQLException   
	 * @return int   
	 * @throws
	 */
	public ResultMap relationlogin(HttpServletRequest request,UserDTO user) throws Exception;
	
	/**
	 * 
	 * @Title: insertUserWechat
	 * @Description: 1、验证登录用户合法  2、关联用户  3、登录
	 * @param faUserWechatDTO
	 * @throws SQLException   
	 * @return int   
	 * @throws
	 */
	public ResultMap relationRegister(HttpServletRequest request,RegisterDTO register) throws Exception;
	
    /** 
     * 公众平台-JS-SDK  wxconfig
     *  
     * @param request 
     * @return  boolean
     */  
    public ResultMap getjsApiwxconfig(HttpServletRequest request) throws Exception;
    
     
    /**
     * 微信绑定
     * @param userId
     * @return
     * @throws SQLException
     */
    public ResultMap relationWechat(String userId) throws SQLException;
    
    /**
     * 获取微信图片地址
     * @param imgServerId
     * @return
     * @throws SQLException
     */
    public boolean getFilePath(String imgServerId,String filePath) throws Exception;

    /**
     * 微信静默授权
     * @param request
     * @return
     * @throws Exception
     */
	public ResultMap mpCallbackNotAuth(HttpServletRequest request) throws Exception;
	
}
